package com.company.mediator.sample01;

public class Client
{
	public static void main(String args[])
	{
		AbstractChatroom happyChat=new ChatGroup();
		Member member1,member2,member3,member4,member5;
		member1=new DiamondMember("zhangsan");
		member2=new DiamondMember("lisi");
		member3=new CommonMember("wangwu");
		member4=new CommonMember("gouliu");
		member5=new CommonMember("huqi");
		
		happyChat.register(member1);
		happyChat.register(member2);
		happyChat.register(member3);
		happyChat.register(member4);
		happyChat.register(member5);
		
		member1.sendText("zhangsan","1222");
		member2.sendText("wangwu","AA 23333");
		member1.sendText("gouliu","Guess What");
		member2.sendImage("huqi","Hello world");
		member2.sendImage("wangwu","ABC");
		member3.sendText("lisi","No matter");
		member3.sendText("huqi","Addddd");
		member4.sendText("zhangsan","I dont know");
		member5.sendText("lisi","I beleive I can fly");
		member5.sendImage("wangwu","Do");
	}
}